home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2577 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: news.danadata.dk!usenet
  2. From: televis@aix1.danadata.dk (Thomas Zaschke)
  3. Newsgroups: comp.lang.c++
  4. Subject: prob. exporting functions in Borland C++ into DLL
  5. Date: 18 Jan 1996 08:40:07 GMT
  6. Organization: TeleDanmark, Television
  7. Message-ID: <4dl117$ace@news.danadata.dk>
  8. NNTP-Posting-Host: 193.162.156.43
  9. Mime-Version: 1.0
  10. X-Newsreader: WinVN 0.93.11
  11.  
  12. My problem:
  13.  
  14. I am writing a Windows-DLL (16-bit), to be used by a non-C application.
  15. All my sources are compiled with Borlands C++ compiler from within
  16. Borland C++ 4.53. All extensions are *.cpp.
  17.  
  18. I want to export a function "MyFunc".
  19.  
  20. 1) When using "_export" before the function-name, the resulting DLL does 
  21. not
  22. content the name "MyFunc" as i would expect, but something like 
  23. "MyFunc$QV".
  24.  
  25. 2) When using a .def file and exporting "MyFunc" explicitly, i get this 
  26. error
  27. message "Attempt to export non-public symbol <myfunction-name>".
  28.  
  29. I do not experience these problems when compiling and linking pure 
  30. C-source.
  31.  
  32. My question is:
  33.  
  34. How can I export "MyFunc" in a DLL and be sure that other applications
  35. actually can see the correct name: "MyFunc" ?
  36.  
  37. If I am forced to use a .def file (to export by ordinal), how do I get 
  38. this
  39. to work without the before mentioned error ?
  40.  
  41.  
  42. Thomas Zaschke
  43. televis@aix1.danadata.dk
  44.  
  45.